Skip to content

[Feature] Refactor batch invariant fp8 DeepGEMM#27606

Merged
mgoin merged 11 commits intomainfrom
wentao-refactor-batch-invariant-fp8-deepgemm
Nov 11, 2025
Merged

[Feature] Refactor batch invariant fp8 DeepGEMM#27606
mgoin merged 11 commits intomainfrom
wentao-refactor-batch-invariant-fp8-deepgemm

Conversation

@yewentao256
Copy link
Copy Markdown
Member

@yewentao256 yewentao256 commented Oct 27, 2025

Purpose

Fixes #27127 (comment) @mgoin

We can reuse the code from fp8_utils to simplify the logic

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the apply method in Fp8LinearMethod to simplify the logic for batch-invariant FP8 GEMM. The change reuses W8A8BlockFp8LinearOp for block-quantized weights, aligning the batch-invariant path with the non-batch-invariant path and replacing a dequantization fallback with a more performant quantized kernel path. While this is a good simplification, I've identified a potential issue related to the removal of a safety check for handling weight scales of square matrices, which could lead to incorrect behavior in some edge cases.

@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 27, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Oct 30, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @yewentao256.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Oct 30, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
@mergify mergify Bot removed the needs-rebase label Oct 30, 2025
Comment thread vllm/model_executor/layers/quantization/fp8.py
@yewentao256
Copy link
Copy Markdown
Member Author

This PR could also fix #28249

@mgoin mgoin enabled auto-merge (squash) November 10, 2025 22:28
@mgoin mgoin merged commit 35d801f into main Nov 11, 2025
56 checks passed
@mgoin mgoin deleted the wentao-refactor-batch-invariant-fp8-deepgemm branch November 11, 2025 00:08
@ywang96 ywang96 added this to the v0.11.1 milestone Nov 13, 2025
khluu pushed a commit that referenced this pull request Nov 16, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
khluu pushed a commit that referenced this pull request Nov 16, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
(cherry picked from commit 35d801f)
devpatelio pushed a commit to SumanthRH/vllm that referenced this pull request Nov 29, 2025
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants